﻿{% extends "../../../templates/admin_template.html" %}
{% block content %}

<h1>Lista de Cursos de {{school.name}}</h1>

{% if classes %}
	<table border="0">
		<tr>
			<th>Curso</th>
			<th>Año</th>
			<th>Profesor a Cargo</th>
			<th colspan="2">Acciones</th>
		</tr>
		{% for class in classes %}
		<tr>
			<td>{{class.name}}</td>
			<td>{{class.year}}</td>
			<td>{% if class.teacher %}{{class.teacher.user.name}} {{class.teacher.user.surname}}{%else%}Sin profesor asignado{%endif%}</td>
			<td><a href="/admin/students/{{class.key.id}}/list">Lista de alumnos</a></td>
			<td><a href="/admin/students/{{class.key.id}}/add">Agregar alumnos</a></td>
			<td><a href="/admin/classes/{{class.key.id}}/assign">Asignar Profesor</a></td>
		</tr>
		{% endfor %}
	</table>
{% else %}
	<p>No hay cursos para este colegio</p>
{% endif %}
<a href="/admin/teachers/{{school.key.id}}/list">Lista de profesores</a>
<table>
	
</table>

{% endblock content %}

